<?php
declare (strict_types = 1);

namespace app\admin\controller;

use think\facade\Session;
use think\facade\Request;
class Index extends Base
{
    public function index()
    {
        return $this->fetch('',[
            'nickname'  => get_field('admin_admin',Session::get('admin.id'),'nickname')
        ]);
    }
    public function home()
    {
        return $this->fetch('',$this->getSystem());
    }

    public function menu()
    {
        return json(get_tree(Session::get('admin.menu')));
    }
    // 清除缓存
    public function cache(){
        Session::clear();
        return $this->getJson(rm());
    }
}
